using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using Library.Business;

namespace HoaDonNuoc.Interface.BaoCao
{
    public partial class rpt_BangGhiChiSoDongHo : DevExpress.XtraReports.UI.XtraReport
    {
        public String ID_HeThongNuoc
        { set; get; }
        public int Thang
        { set; get; }
        public int Nam
        { set; get; }
        //
        public int ChiSoCu
        { set; get; }
        public int ChiSoMoi
        { set; get; }
        public int SoM3SanXuat
        { set; get; }
        public int SoM3GhiThu
        { set; get; }
        public int ChenhLech
        { set; get; }
        public double TyLeThatThoat
        { set; get; }
        public rpt_BangGhiChiSoDongHo()
        {
            InitializeComponent();
        }

        private void PageHeader_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            load_DuLieu();
        }
        public void load_DuLieu()
        {
            try
            {
                if (ID_HeThongNuoc != null)
                {
                    string tenHeThong = Cls_HeThongNuoc.getOject_Key(ID_HeThongNuoc).TenHeThong;
                    lbt_0.Text = string.Format(lbt_0.Text, tenHeThong, Thang, Nam);
                    lbt_1.Text = String.Format(lbt_1.Text,ChiSoCu,ChiSoMoi);
                    lbt_2.Text = String.Format(lbt_2.Text, SoM3SanXuat);
                    lbt_3.Text = String.Format(lbt_3.Text, SoM3GhiThu);
                    lbt_4.Text = String.Format(lbt_4.Text, ChenhLech);
                    lbt_5.Text = String.Format(lbt_5.Text, TyLeThatThoat.ToString("#,##0.00"));
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }


        }

    }
}
